/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef __MOKOKO_SONG__
#define __MOKOKO_SONG__
#include "list.h"
#include <id3tag.h>

enum Song_Status {
    READY_TO_PLAY = 0,
    PLAYING,
    PAUSED,
    FORWARDING,
    BACKWARDING,
    PLAYED,
    BROKEN,
};

struct _Song {
    char *file;
    struct id3_tag *id3tag;
    unsigned long playlength;
    unsigned long playto;
    char *image;
    enum Song_Status status;
    struct list_head all_song_node;
    struct list_head album_node;
    struct list_head play_list_node;
    struct list_head shuffle_list_node;
};

typedef struct _Song Song;

Song *song_new(const char *filename);
void song_free(Song *);
char *song_dirname(Song *S);


#endif
